/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * 
 * JNewFrame.java
 *
 * Created on 12/04/2013
 *
 **
 * @author Abdel
 */

package JNew.gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;


public class JNewFrame extends javax.swing.JFrame {

    /** Creates new form JNewFrame */
    public JNewFrame() {
        initComponents();
        initOtherComponents();
    }

    /*
     * Agregamos los componentes creados
     */
    private void initOtherComponents(){
        Color color1, color2;
        
        JNewPanel panel = new JNewPanel(Color.WHITE);   // Fondo Blanco
        panel.setLayout( new FlowLayout(FlowLayout.CENTER) );

        //Botones
        color1 = new Color(255,0,0);    // Rojo
        color2 = new Color(200,0,0);    // Rojo oscuro
        JNewButton boton1 = new JNewButton("Mi boton1", color1, color2);
        color1 = new Color(0,255,0);    // Verde
        color2 = new Color(0,200,0);    // Verde oscuro
        JNewButton boton2 = new JNewButton("Mi boton2", color1, color2);
        color1 = new Color(0,0,255);    // Azul
        color2 = new Color(0,0,200);    // Azul oscuro
        JNewButton boton3 = new JNewButton("Mi boton3", color1, color2);
        // ============================

        panel.add(boton1);
        panel.add(boton2);
        panel.add(boton3);
        
        this.add(panel, BorderLayout.CENTER);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
   
     private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-418)/2, (screenSize.height-345)/2, 418, 345);
    }

}
